import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import htmlPlugin from "vite-plugin-index-html";
import { useDynamicPublicPath } from 'vite-plugin-dynamic-publicpath'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
      vue(),
      useDynamicPublicPath({
          assetsBase: 'http://localhost:8082/'
      }),
      htmlPlugin({
        input: './src/main.ts', // 指定确定的入口文件
        preserveEntrySignatures: "exports-only", // 确保入口文件导出生命周期函数
      })
  ],
  base: 'newDeviceRisk/',
  server: {
    port: 8082,
    cors: true
  }
})
